<!DOCTYPE html>
<html>
<head>
    <include file="./public/sty.html"/>
    <style>
        .NumLink{display: none!important;}
        .on{display: inline-block!important;}
    </style>
    <style>
        .c-pages{padding:20px 0; text-align: center;}
        .c-pages.tl{text-align: left;}
        .c-pages span{display: inline-block; margin-right: 5px; font-size:12px; height:28px; line-height: 28px;}
        .c-pages span.col{color: #fe344e; font-weight: 600;}
        .c-pages span a{display: inline-block; margin:0 3px; height:28px; line-height: 28px; text-align: center; padding:0 12px; border:1px solid #ccc; text-decoration: none; border-radius: 2px;}
        .c-pages span a:link,.c-pages span a:active,.c-pages span a:visited{color: #333;}
        .c-pages span a:hover{ color: #ff8540; }
        .c-pages span a.active{color: #fff; background: #ff8540;}
        .c-pages  .current{ color: #fff; background: #ff8540; display: inline-block; margin: 0 3px; height: 28px;
            line-height: 28px;
            text-align: center;
            padding: 0 12px;
            text-decoration: none;
            border-radius: 2px;
        }
    </style>
</head>
<body>
<div id="app" class="BetRecord">
    <include file="./public/header.html"/>

    <div class="container pt15 fix" s="[object Object]">
        <div class="slideUser">
            <ul class="sildeSession"><h3><span></span>账号管理</h3>
                <li class=""><a href="{:U('Users/personalInfo')}">个人信息</a></li>
                <li class="curr"><a href="{:U('Users/securityCenter')}">安全中心</a></li>
                <li class=""><a href="{:U('Users/manageBankcard2')}">银行卡管理</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>投注管理</h3>
                <li><a href="{:U('Users/BetRecord')}" class="">投注记录</a></li>
                <li><a href="{:U('Users/seekOrder')}" class="">追号记录</a></li>
            </ul>
            <ul class="sildeSession"><h3><span></span>资金管理</h3>
                <li><a href="{:U('Users/BillRecord')}" class="">交易记录</a></li>
                <li class=""><a href="{:U('Users/PLstatement')}">今日盈亏</a></li>
            </ul>
            <?php if($wanjia['utype'] == '1'){ ?>
            <ul class="sildeSession">
                <h3><span></span>代理中心</h3>
                <li><a href="{:U('Users/agentIntro')}" class="">代理说明</a></li>
                <li class=""><a href="{:U('Users/agentReport')}">代理报表</a></li>
                <li><a href="{:U('Users/lowerReport')}" class="">下级报表</a></li>
                <li class=""><a href="{:U('Users/manageInvite')}">下级开户</a></li>
                <li><a href="{:U('Users/agentMember')}" class="">会员管理</a></li>
                <li><a href="{:U('Users/agentBetRecord')}" class="">投注明细</a></li>
                <li><a href="{:U('Users/agentBillRecord')}" class="">交易明细</a></li>
            </ul>
            <?php }?>
            <ul class="sildeSession"><h3><span></span>消息管理</h3>
                <li><a href="{:U('Users/letter')}" class="">站内信</a></li>
                <li><a href="{:U('Users/Notice')}" class="">网站公告</a></li>
            </ul>
        </div>
        <div class="userRight">

    <div class="userTitle mgb10">投注记录</div>
    <div class="userMain mgb10">
        <form class="well form-search" method="post" action="{:U('Users/BetRecord')}">
            <input type="hidden" name="id" id="uid" value="{$id}">
                <ul class="todayView mgb10">
                    <li>今日概况</li>
                    <li>投注金额：<span><?php echo sprintf('%.2f',$touzhu); ?>元</span></li>
                    <li>中奖金额：<span><?php echo sprintf('%.2f',$zhongjiang); ?>元</span></li>
                    <li>盈利：<span><?php echo sprintf('%.2f',$yingli); ?>元</span></li>
                </ul>
                <ul data-v-be5f85f8="" class="searchFirst">
                    <li data-v-be5f85f8=""><span data-v-be5f85f8="">彩种：</span>
                        <ins data-v-be5f85f8="" class="selectIcon">
                            <div data-v-be5f85f8="" class="title"><span class="fx_c_name">全部彩票</span>
                                <select name="caizhong" id="caizhong" onchange="xuanze2()" data-v-be5f85f8="" class="userSelect" >
                                    <option value="" >全部彩票</option>
                                    <foreach name="classs" item="v">
                                        <option value="{$v.id}" <?php if($caizhong==$v["id"]){echo "selected";};?>>{$v.name}</option>
                                    </foreach>
                                </select>
                            </div>
                            <em data-v-be5f85f8=""></em>
                        </ins>
                    </li>
                    <li data-v-be5f85f8="" class="_time">
                        <span data-v-be5f85f8="">时间：
                            <a data-v-be5f85f8="" class="userSearch times <?php if($shijian=='1'){echo 'active';}; ?> " data-value="1" onclick="xuanze(this.id)" id="jintian" name="jintian">今天</a>
                            <a data-v-be5f85f8="" class="userSearch times <?php if($shijian=='2'){echo 'active';}; ?>" data-value="2"  onclick="xuanze(this.id)" id="zuotian" name="zuotian" >昨天</a>
                            <a data-v-be5f85f8="" class="userSearch times <?php if($shijian=='3'){echo 'active';}; ?>" data-value="3"  onclick="xuanze(this.id)" id="qitian" name="qitian">七天</a>
                        </span>
                    </li>
                    <li data-v-be5f85f8="" class="_state">
                        <span data-v-be5f85f8="">类型：
                            <a data-v-be5f85f8="" class="userSearch lx <?php if($leixing=='0'){echo 'active';}; ?> " data-id="0" onclick="xuanze3(this.id)" id="quan">全部</a>
                            <a data-v-be5f85f8="" class="userSearch lx <?php if($leixing=='1'){echo 'active';}; ?> " data-id="1" onclick="xuanze3(this.id)" id="yi">已中奖</a>
                            <a data-v-be5f85f8="" class="userSearch lx <?php if($leixing=='2'){echo 'active';}; ?> " data-id="2" onclick="xuanze3(this.id)" id="wei">未中奖</a>
                            <a data-v-be5f85f8="" class="userSearch lx <?php if($leixing=='3'){echo 'active';}; ?> " data-id="3" onclick="xuanze3(this.id)" id="deng">等待开奖</a>
                        </span>
                    </li>
                </ul>
            </form>
                <div class="searchDetail">
                    <table>
                        <tbody>
                        <tr>
                            <th colspan="1">彩种</th>
                            <th>期号</th>
                            <th>投注内容</th>
                            <th>投注金额</th>
                            <th>开奖号码</th>
                            <th>奖金状态</th>
                            <th>投注时间</th>
                            <th>操作项</th>
                        </tr>
                        </tbody>

                <?php if(!empty($arr)){?>
                        <tbody class="Records_listCont">
                        <foreach name="arr" item="v">
                            <tr>
                                <td style="color: rgb(74, 169, 219);">{$v.classname}</td>
                                <td>{$v.issue}</td>
                                <td >
                                    <div style="width: 60px" class="betNum"  data-qzhu="<?php if($v['table']=='1'){echo $a1[$v['id']];}
                                    elseif($v['table']=='2'){echo $a2[$v['id']];}
                                    elseif($v['table']=='3'){echo $a3[$v['id']];}
                                    elseif($v['table']=='4'){echo $a4[$v['id']];}
                                    elseif($v['table']=='5'){echo $a5[$v['id']];}
                                    elseif($v['table']=='6'){echo $a6[$v['id']];}
                                    ;?>">
                                        <?php if($v["table"]=='1'){echo $a1[$v['id']];}
                                        elseif($v["table"]=='2'){echo $a2[$v['id']];}
                                        elseif($v["table"]=='3'){echo $a3[$v['id']];}
                                        elseif($v["table"]=='4'){echo $a4[$v['id']];}
                                        elseif($v["table"]=='5'){echo $a5[$v['id']];}
                                        elseif($v["table"]=='6'){echo $a6[$v['id']];}
                                        ;?>
                                    </div>
                                    <a class="NumLink" style="color: rgb(74, 169, 187);display: none">[详情]</a>
                                </td>
                                <td><?php echo sprintf("%.2f",$v['money']); ?></td>
                                <td>
                                    <div class="betNum" data-qzhu="{$v.opencode}">
                                        <?php if(trim($v['opencode'])==""){echo "----";}else{echo $v['opencode'];} ?>
                                    </div>
                                    <a class="NumLink1" style="color: rgb(74, 169, 187);display: none">[详情]</a>
                                </td>
                                <td style="color: rgb(228, 57, 60);">
                                    <?php if(trim($v["opencode"])==''){echo "等待开奖";}
                                     elseif($v['zong_money'] > 0 && $v['opencode']!=''){echo sprintf("%.2f",$v['zong_money']);}
                                    elseif($v["zong_money"] == 0 && $v["opencode"]!=''){echo "未中奖";} ;?>
                                </td>

                                <td><?php echo date("Y-m-d H:i:s",$v["ctime"]);?></td>
                                <td>
                                    <a  href="{:U('Users/betDetail',array('lotteryclass'=>$v['lotteryclass'],'table'=>$v['table'],'id'=>$v['id']))}">查看</a>
                                </td>
                            </tr>
                        </foreach>
                        </tbody>
                        <?php }else{ ?>
                        <div class="Records_listCont" id="t2">
                            <tr style="border-bottom-width: 0px;">
                                <td colspan="100">
                                    <div class="notContent" style="padding: 100px 0px;"><i class="iconfont"></i>暂无记录</div>
                                </td>
                            </tr>
                        </div>
                        <?php }?>
                    </table>

                </div>

                    <div class="c-pages tc">
                        <span>{$page}第{$p}页/共{$totalpage}页</span>
                    </div>

                <div class="userTip mgt15"><p><i></i>温馨提示：投注记录最多只保留7天。
                </p></div>
            </div>
        </div>
    </div>

    <include file="./public/footer.html"/>
</div>
<!--弹出框-->
<div id="layermbox7" class="layermbox layermbox0 layermshow" index="7">
    <div class="laymshade"></div>
    <div class="layermmain">
        <div class="section">
            <div class="layermchild  layermanim"><h3 style="">投注内容</h3>
                <button class="layermend"></button>
                <div class="layermcont"></div>
                <div class="layermbtn"><span type="1">关闭</span></div>
            </div>
        </div>
    </div>
</div>
<!--弹出框 end-->

<script src="/style/js/jquery.min.js"></script>
<script src="/style/js/fx.js"></script>
<script>
    $(function(){
        personalInfo();
        $(".userSearch").click(function (){
            $(this).addClass("active").siblings(".userSearch").removeClass("active");
        });

        $(".betNum").each(function(){
            var str = $(this).text();
            if(str.length>120){
                $(this).siblings(".NumLink").addClass("on");
            }
            if(str.length>100){
                $(this).siblings(".NumLink1").addClass("on");
            }
        });
        $(".NumLink").click(function(){
            var txt = $(this).prev().data("qzhu");
            $("#layermbox7 .layermcont").text(txt);
            $("#layermbox7").show();
        });
        $(".NumLink1").click(function(){
            var txt = $(this).prev().data("qzhu");
            $("#layermbox7 .layermcont").text(txt);
            $("#layermbox7").show();
        });



        var txt = $(this).find("option:selected").text();
        $(".fx_c_name").text(txt);
        $(".userSelect").change(function(){
            var val = $(this).val();
            var txt = $(this).find("option:selected").text();
            $(".fx_c_name").text(txt);
        })
    })

    //时间的 传值
    function xuanze(a){
        var lotteryclass = $("#caizhong").val();
        var shijian = $("#"+a).attr("data-value");
        var leixing = $(".userSearch.lx.active").attr("data-id");

        window.location.href="/Users/BetRecord/lotteryclass/"+lotteryclass+"/shijian/"+shijian+"/leixing/"+leixing;
    }
    //彩种的 传值
    function xuanze2(){
        var lotteryclass = $("#caizhong").val();
        var shijian = $(".userSearch.times.active").attr("data-value");
        var leixing = $(".userSearch.lx.active").attr("data-id");
        window.location.href="/Users/BetRecord/lotteryclass/"+lotteryclass+"/shijian/"+shijian+"/leixing/"+leixing;
    }
    function xuanze3(b){
        var lotteryclass = $("#caizhong").val();
        var shijian = $(".userSearch.times.active").attr("data-value");
        var leixing = $("#"+b).attr("data-id");
        window.location.href="/Users/BetRecord/lotteryclass/"+lotteryclass+"/shijian/"+shijian+"/leixing/"+leixing;
    }


</script>
</body>
</html>